package com.wn.ziroom.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wn.ziroom.entity.Cart;
import com.wn.ziroom.entity.CartItem;
import com.wn.ziroom.entity.vo.ProductionVo;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wangzhijia
 * @since 2023-02-23 02:27:54
 */
public interface CartService extends IService<Cart> {

    int addProduction(Integer userId, ProductionVo production, Integer buyCount);

    List<CartItem> findCartByUserId(Integer userId);

    void deleteProduction(Integer userId, Integer productionId);

    void updateBuyCount(Integer userId, Integer buyCount,Integer productionId);

    List<CartItem> findCartByUserIdAndProIds(Integer userId, String[] productionIds);

    void deleteByProductionIds(String[] splitProductionId, Integer userId);
}
